/*
 * Copyright 2007 Xplayat, S.L. All rights reserved.
 * Propiedad de Xplayat. 
 */
package facelets.component;

import org.apache.myfaces.component.html.ext.HtmlMessage;

import com.sun.facelets.tag.jsf.ComponentConfig;
import com.sun.facelets.tag.jsf.ComponentHandler;

/**
 * @author nachoe
 *
 */
public class MessageComponentHandler extends ComponentHandler { // NO_UCD
	
	public MessageComponentHandler(ComponentConfig cfg) {
		super(cfg);
	}
	
	/* (non-Javadoc)
	 * @see com.sun.facelets.tag.MetaTagHandler#setAttributes(com.sun.facelets.FaceletContext, java.lang.Object)
	 */
	public void setAttributes(com.sun.facelets.FaceletContext ctx, Object instance) {
		super.setAttributes(ctx, instance);
		HtmlMessage mes = (HtmlMessage)instance;
		if (super.getAttribute("replaceIdWithLabel")==null)
			mes.setReplaceIdWithLabel(true);
		
	}
}